home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 2.iso / dist / fw_gnome-libs.idb / usr / freeware / share / idl / desktop-textviewer.idl.z / desktop-textviewer.idl
Text File  |  2002-07-08  |  2KB  |  69 lines

  1. #ifndef __DESKTOP_TEXTVIEWER_IDL__
  2. #define __DESKTOP_TEXTVIEWER_IDL__
  3.  
  4. #if defined(__ORBIT_IDL__)
  5. %{
  6. #pragma include_defs libgnorba/gnome-unknown.h
  7. #pragma include_defs libgnorba/gnome-factory.h
  8. %}
  9. #pragma inhibit push
  10. #endif
  11.  
  12. #include "gnome-unknown.idl"
  13. #include "gnome-factory.idl"
  14.  
  15. #if defined(__ORBIT_IDL__)
  16. #pragma inhibit pop
  17. #endif
  18.  
  19. module Desktop {
  20.     enum SEEKFROM {
  21.         SEEK_START,
  22.         SEEK_CURRENT,
  23.         SEEK_END
  24.     };
  25.  
  26.     struct Range {
  27.         long begin;
  28.         long end;
  29.     };
  30.  
  31.     typedef long SearchOption;
  32.     const SearchOption REG_REGEX = 1;
  33.     const SearchOption REG_ICASE = 2;
  34.     const SearchOption REG_NOSUB = 4;
  35.     const SearchOption REG_NEWLINE = 8;
  36.     const SearchOption SEARCH_REVERSE = 16;
  37.  
  38.     interface TextViewerFactory : GNOME::GenericFactory {
  39.         exception NotFound {};
  40.  
  41.         Object open (in string path) raises (NotFound);
  42.         Object open_existing (in string path) raises (NotFound);
  43.     };
  44.  
  45.     interface TextViewer : GNOME::Unknown {
  46.         exception SaveError {};
  47.         exception OutOfRange {};
  48.         exception NotFound {};
  49.  
  50.         readonly attribute string path;
  51.         readonly attribute unsigned long position;
  52.         attribute Range selection;
  53.  
  54.         void scroll_pos     (in long          offset,
  55.                              in SEEKFROM      whence) raises (OutOfRange);
  56.         void scroll_line    (in unsigned long line);
  57.         long search         (in string        regexp,
  58.                              in SEEKFROM      whence,
  59.                              in SearchOption  flags) raises (NotFound);
  60.  
  61.         GNOME::stringlist get_text (in Range what);
  62.         void save () raises (SaveError);
  63.         void save_as (in string path) raises (SaveError);
  64.         void close ();
  65.     };
  66. };
  67.  
  68. #endif /* __DESKTOP_TEXTVIEWER_IDL__ */
  69.